package com.gjm.demo;

import com.gjm.demo.component.StudentComponent;
import com.gjm.demo.model.Student;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringBootDemo2025416Application {

	public static void main(String[] args) {

		//获取 Spring 上下文对象
		ApplicationContext context = SpringApplication.run(SpringBootDemo2025416Application.class, args);


		Student student1 = (Student)context.getBean("s3");
		System.out.println(student1);

		Student student2 = (Student)context.getBean("s2");
		System.out.println(student2);

	}

}
